using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FallDestroy : MonoBehaviour
{
    private void OnCollisionEnter2D(Collision2D collision)
    {
        //collision.gameObject.GetComponent<Car>()
        if (collision.gameObject.GetComponent<Car>() != null)
        {
            collision.gameObject.SetActive(false);
        }
    }
    /*private void OnCollisionEnter2D(Collider2D collision)
    {
        
    }*/
}
